package com.rr.controller;

import com.rr.service.TestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author zhuangcanrun
 * @Date 2022/05/26/21:21
 * @description
 **/

@RestController
public class TestController {

    @Autowired
    private TestService testService;

    @GetMapping("/test")
    public String test() {
        testService.normalSyncMethod();
        return "ok";
    }

    @GetMapping("/test1")
    public String test1() {
        testService.syncMethodWithExecutor();
        return "ok";
    }

    @GetMapping("/test2")
    public String test2() {
        testService.syncMethodWithExecutor1();
        return "ok";
    }
}
